package com.blockmeta.bbs.businesslibrary.widget.chartview;

import android.view.ScaleGestureDetector;

/**
 * Created by ting on 17/1/9.
 */

class ScaleLinstener implements ScaleGestureDetector.OnScaleGestureListener
{
	CoinChart fdtChart;

	ScaleLinstener(CoinChart pChart) {
		fdtChart = pChart;
	}

	public boolean onScale(ScaleGestureDetector scaleGestureDetector) {
		if (fdtChart.m_chartData == null || ((double) scaleGestureDetector.getScaleFactor()) <= 0.01d) {
			return false;
		}
		float focusX = scaleGestureDetector.getFocusX();
		fdtChart.onZoom(scaleGestureDetector.getScaleFactor(),focusX);
		fdtChart.mZoomMode = true;
		return true;
	}

	public boolean onScaleBegin(ScaleGestureDetector scaleGestureDetector) {
		return true;
	}

	public void onScaleEnd(ScaleGestureDetector scaleGestureDetector) {
	}
}
